#include<stdio.h>

int main(int argc, char const *argv[])
{
    int N,resN=0;
    scanf("%d",&N);
    while (N != 0)
    {
        resN *= 10;
        resN += N % 10;
        N /= 10; 
    }
    
    printf("%d",resN);
    return 0;
}
